<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<style type="text/css">
		#cotaine{
			width: 100%;
			display: flex;
			justify-content: center;
			
		}
		#outDiv{
			width: 600px;
			overflow: hidden;
			
		}
		#imgList{
			width: 1600px;
			display: flex;
			align-items: center;
			justify-content: center;
			margin-top: 200px;
		}
		#imgList img{
			width: 100px;
			height: 100px;
		}
	</style>
	<body>
		<div id="cotaine">
			<div id="outDiv">
				<div id="imgList" onmouseenter="doMouseenter();" onmouseleave="doMouseleave();">
					<img src="img/lunbo/1.jpeg" >
					<img src="img/lunbo/2.jpeg" >
					<img src="img/lunbo/3.jpeg" >
					<img src="img/lunbo/4.jpeg" >
					<img src="img/lunbo/5.jpeg" >
					<img src="img/lunbo/6.jpeg" >
					<img src="img/lunbo/7.jpeg" >
					<img src="img/lunbo/8.jpeg" >
					<img src="img/lunbo/9.jpeg" >
					<img src="img/lunbo/10.jpeg" >
					<img src="img/lunbo/1.jpeg" >
					<img src="img/lunbo/2.jpeg" >
					<img src="img/lunbo/3.jpeg" >
					<img src="img/lunbo/4.jpeg" >
					<img src="img/lunbo/5.jpeg" >
					<img src="img/lunbo/6.jpeg" >
				</div>
			</div>
		</div>
	</body>
	<script type="text/javascript">
		var imgLis = document.getElementById('imgList');
		var marginLeft = 0;
		var mysetInterval = null;
		function doAction(){
			if (marginLeft== -1000) {
				marginLeft=0;
			}
			marginLeft--;
			imgLis.style.marginLeft = marginLeft+'px';
			if (marginLeft % 100 == 0 ) {
				clearInterval(mysetInterval);
				setTimeout(function(){
					clearInterval(mysetInterval);
					mysetInterval = setInterval(doAction,10);
				},1000)
			}
		}
		function doMouseenter(){
			clearInterval(mysetInterval);
		}
		function doMouseleave(){
			clearInterval(mysetInterval);
			mysetInterval = setInterval(doAction,10);
		}
		onload = function(){
			mysetInterval = setInterval(doAction,10);
		}
	</script>
</html>
